import java.util.Scanner;
public class count
{
	public static void main(String args[])
	{
		double freight,discount;
		Scanner scanner=new Scanner(System.in);
		System.out.println("请输入基本运费：");
		double price=scanner.nextDouble();
		System.out.println("请输入货物重量：");
		double weight=scanner.nextDouble();
		System.out.println("请输入距离：");
		double s=scanner.nextDouble();
		if(s<250)
		{
			discount=0;
			freight=price*weight*s*(1-discount);
			System.out.println(freight);
		}
		else if(s<500)
		{
			discount=0.02;
			freight=price*weight*s*(1-discount);
			System.out.println(freight);
		}
		else if(s<1000)
		{
			discount=0.05;
			freight=price*weight*s*(1-discount);
			System.out.println(freight);
		}
		else if(s<2000)
		{
			discount=0.08;
			freight=price*weight*s*(1-discount);
			System.out.println(freight);
		}
		else if(s<3000)
		{
			discount=0.1;
			freight=price*weight*s*(1-discount);
			System.out.println(freight);
		}
		else if(s>=3000)
		{
			discount=0.15;
			freight=price*weight*s*(1-discount);
			System.out.println(freight);
		}
	}
}